-
Notifications
You must be signed in to change notification settings - Fork 76
groupBy Kdocs #1533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
groupBy Kdocs #1533
Conversation
docs/StardustDocs/topics/groupBy.md
Outdated
|
|
||
| ## Reducing | ||
|
|
||
| TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to leave this here like this on the website?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, will comment it, should be added later (#1535)
| /** | ||
| * Groups the specified [columns\] within the [DataFrame]. | ||
| * Groups the specified [columns\] within the [DataFrame] into | ||
| * [column group][ColumnGroup]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*a column group
| /** | ||
| * Groups the rows of this [DataFrame] based on the values in one or more specified [key columns][cols]. | ||
| * Each unique value in a key column — or a unique tuple of values for multiple columns — | ||
| * defines a group consisting of all rows where the column(s) contain that value combination. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say *the group
| * Don't confuse this with [group], which groups column into | ||
| * [column group][org.jetbrains.kotlinx.dataframe.columns.ColumnGroup]. | ||
| */ | ||
| internal interface GroupByDocs { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These docs are amazingly useful!
| * [**`groupBy`**][groupBy]**`(`**`moveToTop: `[`Boolean`][Boolean]**` = true) { `**`columns: `[`ColumnsSelector`][ColumnsSelector]**` }`** | ||
| * | ||
| * {@include [Indent]} | ||
| * `\[ `__`.`__[**`sortByGroup`**][GroupBy.sortByGroup]**`() `** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are no closing "]"s on any of the lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh it's an or-or thing, uhhm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this is wrong :) you can sort multiple times, which can make sense in case of ties. So I'd just put [ .sortByX() ] all on separate lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, all () have an unneeded space after them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, now I added ] to the end of each line, so we need a space in the end.
| * @include [PivotGroupByDocs.CommonDescription] | ||
| */ | ||
| @ExcludeFromSources | ||
| internal interface GroupByForPivotDocs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be private too
| * | ||
| * #### For example: | ||
| * | ||
| * `pivot.`{@get [OPERATION]}` { length `[and][ColumnsSelectionDsl.and]` age }` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you using @get here? They only serve purpose if these docs are included somewhere else and you need a different operation here. [groupBy][groupBy] is shorter to write even ;P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, but I'd like to fix it further (not in ths PR) to use Dsl.WithExample with a custom variable name (df by default but with ability to customize it)
| * | ||
| * #### For example: | ||
| * | ||
| * `df.`{@get [OPERATION]}`("length", "age")` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| public data class GroupWithKey<T, G>(val key: DataRow<T>, val group: DataFrame<G>) | ||
|
|
||
| /** | ||
| * A dataframe-like structure that contains all unique combinations of key values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*key-values?
close #1524